<div>
	<yu-panel title="当前事件">
		<yu-row :gutter="24">
			<yu-col :span="5">
				<yu-xtree ref="refTree" :height="height" @node-click="nodeClickFn" :data-url="treeDataUrl" data-id="currentNodeId" data-label="currentNodeName"
				 data-pid="parentId" :data-async="async" :data-params="param" data-root="0000" style="margin:10px 10px 0 0;" icon="iconPath">
				</yu-xtree>
			</yu-col>
			<yu-col :span="19">
				<yu-xform related-table-name="refTable" form-type="search" v-model="searchFormdata">
					<yu-xform-group :column="4">
						<yu-xform-item label="系统名称" placeholder="系统名称" ctype="input" name="appName" :disabled="appNameDisabled"></yu-xform-item>
						<yu-xform-item label="事件代码" placeholder="事件代码" ctype="input" name="eventCode"></yu-xform-item>
						<yu-xform-item label="事件名称" placeholder="事件名称" ctype="input" name="eventName"></yu-xform-item>
						<yu-xform-item label="周期时点" :title="searchFormdata.cycleTime" placeholder="周期时点" ctype="datepicker" name="cycleTime" format="yyyyMMdd" value-format="yyyyMMdd" ></yu-xform-item>
					</yu-xform-group>
				</yu-xform>
				<div ref="tableBox" style="overflow: auto;">
					<yu-xtable :height="tbHeight" ref="refTable" row-number :data-url="dataUrl" :pageable="true" @selection-change="selectEvent">
						<yu-xtable-column label="系统名称" prop="appName"></yu-xtable-column>
						<yu-xtable-column label="事件代码" prop="eventCode"></yu-xtable-column>
						<yu-xtable-column label="事件名称" prop="eventName" :show-overflow-tooltip="true">
							<template slot-scope="scope">
								<div  class="diandian" v-if="scope.row.eventType=='G'">{{ scope.row.eventName }}</div>
								<a  class="diandian" v-if="scope.row.eventType=='F'" style="text-decoration:underline;color:#636CE4 " href="javascipt:void(0);" @click="viewDataFn(scope.row)">{{ scope.row.eventName }}</a>
							</template>
						</yu-xtable-column>

						<yu-xtable-column label="事件路径" prop="folderPath"></yu-xtable-column>
						<yu-xtable-column label="周期时点" prop="cycleTime" width="90px"></yu-xtable-column>

						<yu-xtable-column label="事件类型" prop="eventType" :options="eventTypeOption" prop="cycleTime" width="90px">></yu-xtable-column>
						<yu-xtable-column label="事件记录时间" width="150px" prop="recordTimeStr"></yu-xtable-column>
						<yu-xtable-column label="状态" prop="recordTime" :formatter="stateFormatter" width="70px"></yu-xtable-column>
						<yu-xtable-column label="操作" width="140px">
							<template slot-scope="scope">
								<yu-button @click="recordEvent(scope.row)" type="text" size="small" v-if="scope.row.eventType=='G' && scope.row.recordTime==null">记录事件</yu-button>
								<yu-button @click="deleteEvent(scope.row)" type="text" size="small" v-if=" scope.row.recordTime!=null">清除事件</yu-button>
							</template>
						</yu-xtable-column>
					</yu-xtable>
				</div>
			</yu-col>
		</yu-row>
	</yu-panel>
	<yu-xdialog title="文件列表" :visible.sync="dialogVisible" width="800px">
		<yu-xtable :pageable="false" :data="eventFiles" style="width: 100%" row-number max-height="350">
			<yu-xtable-column prop="cycleTime" label="文件ID">
			</yu-xtable-column>
			<yu-xtable-column prop="pathName" label="文件名称">
			</yu-xtable-column>
			<yu-xtable-column prop="recordStatus" label="记录状态">
			</yu-xtable-column>

			<yu-xtable-column prop="recordTimeStr" label="记录时间">
			</yu-xtable-column>
			<yu-xtable-column label="操作">
				<template slot-scope="scope">
					<yu-button @click="markFile(scope.row)" type="info" size="small" v-show="scope.row.recordTime==null">标记</yu-button>
					<yu-button @click="clearnMarkFile(scope.row)" type="info" size="small" v-show="scope.row.recordTime!=null">清除</yu-button>
				</template>
			</yu-xtable-column>
		</yu-xtable>
		<div class="yu-grpButton">
			<yu-button @click="cancelFn">关闭</yu-button>
		</div>
	</yu-xdialog>
</div>
<style type="text/css">
	.intervalSelectionClass {
		width: 100px;
		height: 20px;
		float: right;
	}
	.diandian{
		overflow: hidden;
		word-break: break-all;
		box-sizing: border-box;
		text-overflow: ellipsis;
	}
</style>